package com.dinzeer.legendreliclib.lib.compat.slashblade;

import com.dinzeer.legendreliclib.Legendreliclib;
import com.dinzeer.legendreliclib.lib.compat.slashblade.entity.SwordSpiritEntity;
import com.dinzeer.legendreliclib.lib.compat.slashblade.entity.swordrain.BaseSwordRainEntity;
import com.dinzeer.legendreliclib.lib.compat.slashblade.entity.swordrain.DelayedTrackingSwordRainEntity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class SlashBladeCompatEntities {
    public static final DeferredRegister<EntityType<?>> ENTITIES =
            DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, Legendreliclib.MODID);

    public static final RegistryObject<EntityType<SwordSpiritEntity>> SWORD_SPIRIT =
            ENTITIES.register("sword_spirit",
                    () -> EntityType.Builder.<SwordSpiritEntity>of(SwordSpiritEntity::new, MobCategory.MISC)
                            .sized(0.5F, 0.5F) // 碰撞箱大小
                            .clientTrackingRange(4)
                            .updateInterval(1) // 更新间隔
                            .build("sword_spirit"));
    public static final RegistryObject<EntityType<BaseSwordRainEntity>> BASE_SWORD_RAIN =
            ENTITIES.register("base_sword_rain",
                    () -> EntityType.Builder.of(BaseSwordRainEntity::new, MobCategory.MISC)
                            .sized(0.9F, 0.9F) // 碰撞箱大小
                            .clientTrackingRange(4)
//                            .updateInterval(20) // 更新间隔
                            .updateInterval(1) // 更新间隔
                            .build("base_sword_rain"));
    public static final RegistryObject<EntityType<DelayedTrackingSwordRainEntity>> Delayed_Tracking_Sword_Rain =
            ENTITIES.register("delayed_tracking_sword_rain",
                    () -> EntityType.Builder.of(DelayedTrackingSwordRainEntity::new, MobCategory.MISC)
                            .sized(0.9F, 0.9F) // 碰撞箱大小
                            .clientTrackingRange(4)
                            .updateInterval(20) // 更新间隔
                            .build("delayed_tracking_sword_rain"));
}
